Skip to content

[ALMIOPEN-1856] Simplify dnn-benchmarking engine comparison CLI#7866

Merged
SamuelReeder merged 6 commits into
developfrom
users/sareeder/simplify-benchmark-engine-comparison
Jun 1, 2026
Merged

[ALMIOPEN-1856] Simplify dnn-benchmarking engine comparison CLI#7866
SamuelReeder merged 6 commits into
developfrom
users/sareeder/simplify-benchmark-engine-comparison

Conversation

@SamuelReeder

@SamuelReeder SamuelReeder commented May 28, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR replaces the old A/B-specific dnn-benchmarking workflow with an explicit ordered multi-engine path. It keeps engine selection on --engine, supports repeated engine IDs as distinct selections, and allows comma-delimited plugin paths that map positionally to the selected engines.

Risk Assessment

Medium risk. This changes CLI behavior and removes legacy A/B flags in a benchmark tool, but the new path is covered by parser, config, execution, reporting, full Python tests, and gfx90a hardware smoke validation.

Testing Summary

  • Static Python compile validation covered the changed source and tests.
  • Full dnn-benchmarking pytest coverage ran on Alola gfx90a with Python 3.12 and ROCm PyTorch, including GPU-marked tests.
  • Focused regression coverage includes CLI parsing, config validation, ordered engine/plugin selection, same-engine/different-plugin paths, absolute per-engine plugin loading, per-engine setup failures, output shape, internal profiling plugin-path forwarding, and serialization.
  • Pre-commit ran on all PR-changed files and passed.
  • Alola gfx90a validation used the installed MIOpen provider from /opt/rocm/lib/hipdnn_plugins/engines and ran dnn-benchmarking smoke tests for single-engine, two-engine, and comma-delimited plugin-path flows.

Testing Checklist

  • Python compile - python3 -m compileall -q projects/hipdnn/tools/dnn-benchmarking/src/dnn_benchmarking projects/hipdnn/tools/dnn-benchmarking/tests - Status: Passed
  • Pre-commit on PR-changed files - pre-commit run --files <PR changed files> - Status: Passed
  • Full dnn-benchmarking test suite - workspace/scripts/alola-session run -- 'cd /home/AMD/sareeder/worktrees/rocmlibs-benchmarking-alola-test/projects/hipdnn/tools/dnn-benchmarking && source /workspace/.venv/bin/activate && DNN_BENCH_WORKSPACE=/workspace python -m pytest tests' - ASICs: gfx90a - Status: Passed, 683 passed, 6 skipped, 8 xfailed
  • Alola engine listing - hipdnn_list_engines --plugin-dir /opt/rocm/lib/hipdnn_plugins/engines - ASICs: gfx90a - Status: Passed, found MIOPEN_ENGINE and MIOPEN_ENGINE_DETERMINISTIC
  • Alola single-engine smoke - python -m dnn_benchmarking --graph graphs/sample_conv_fwd.json --warmup 1 --iters 2 --engine 1563989756945604898 --plugin-path /opt/rocm/lib/hipdnn_plugins/engines - ASICs: gfx90a - Status: Passed
  • Alola two-engine smoke - python -m dnn_benchmarking --graph graphs/sample_conv_fwd.json --warmup 1 --iters 5 --engine 1563989756945604898,-6748551569128940061 --plugin-path /opt/rocm/lib/hipdnn_plugins/engines - ASICs: gfx90a - Status: Passed
  • Alola comma-delimited plugin-path smoke - python -m dnn_benchmarking --graph graphs/sample_conv_fwd.json --warmup 1 --iters 1 --engine 1563989756945604898,-6748551569128940061 --plugin-path /opt/rocm/lib/hipdnn_plugins/engines,/opt/rocm/lib/hipdnn_plugins/engines - ASICs: gfx90a - Status: Passed
  • PR CI - GitHub PR checks - Status: Pending

Example comparison:

Results:
  engine                       status  plugin_path                           kernel_mean_ms  kernel_median_ms  e2e_mean_ms  e2e_median_ms
  ---------------------------  ------  ------------------------------------  --------------  ----------------  -----------  -------------
  MIOPEN_ENGINE                passed  /opt/rocm/lib/hipdnn_plugins/engines  0.028           0.027             0.069        0.041
  MIOPEN_ENGINE_DETERMINISTIC  passed  /opt/rocm/lib/hipdnn_plugins/engines  0.026           0.026             0.042        0.037

Technical Changes

  • Removes legacy A/B runner/configuration code and old --AId, --BId, --APath, and --BPath flags.
  • Adds comma-delimited --plugin-path parsing with validation for one shared plugin path or one path per selected engine.
  • Preserves duplicate --engine IDs and models each requested run as an ordered engine selection with its own plugin path.
  • Uses absolute plugin loading mode for per-engine plugin-path setup so plugin comparisons are isolated.
  • Records per-engine plugin setup and handle creation failures as error rows instead of aborting the suite.
  • Adds per-engine summary rows with raw kernel/E2E means and medians; percent deltas are intentionally not emitted because they are derivable from the raw columns.
  • Serializes median timing data and plugin paths for JSON consumers.
  • Documents hipdnn_list_engines --plugin-dir <path> in CLI help so users can discover engine IDs and names.
  • Raises dnn-benchmarking's Python minimum to 3.12 and uses Python 3.12 tarfile data filters directly for tarball graph extraction.

@codecov-commenter

codecov-commenter commented May 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

❌ Your project status has failed because the head coverage (77.83%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7866      +/-   ##
===========================================
+ Coverage    62.06%   62.08%   +0.02%     
===========================================
  Files         2085     2087       +2     
  Lines       357573   357886     +313     
  Branches     54060    54097      +37     
===========================================
+ Hits        221918   222179     +261     
- Misses      116866   116894      +28     
- Partials     18789    18813      +24     
Flag Coverage Δ *Carryforward flag
TensileLite 27.29% <ø> (ø) Carriedforward from f732f83
hipBLAS 90.65% <ø> (ø) Carriedforward from f732f83
hipBLASLt 41.27% <ø> (ø) Carriedforward from f732f83
hipCUB 82.21% <ø> (ø) Carriedforward from f732f83
hipDNN 86.59% <ø> (-0.02%) ⬇️
hipFFT 50.00% <ø> (ø) Carriedforward from f732f83
hipRAND 76.12% <ø> (ø) Carriedforward from f732f83
hipSOLVER 69.24% <ø> (ø) Carriedforward from f732f83
hipSPARSE 85.42% <ø> (ø) Carriedforward from f732f83
rocBLAS 48.09% <ø> (ø) Carriedforward from f732f83
rocFFT 52.07% <ø> (ø) Carriedforward from f732f83
rocRAND 57.04% <ø> (ø) Carriedforward from f732f83
rocSOLVER 77.83% <ø> (ø) Carriedforward from f732f83
rocSPARSE 72.68% <ø> (ø) Carriedforward from f732f83

*This pull request uses carry forward flags. Click here to find out more.
see 8 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@SamuelReeder SamuelReeder changed the title Simplify dnn-benchmarking engine comparison CLI [ALMIOPEN-1856] Simplify dnn-benchmarking engine comparison CLI May 29, 2026
SamuelReeder and others added 3 commits May 30, 2026 03:23
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Comment thread projects/hipdnn/tools/dnn-benchmarking/src/dnn_benchmarking/graph/resolver.py Outdated
Comment thread projects/hipdnn/tools/dnn-benchmarking/tests/unit/cli/test_suite_cli.py Outdated

@tvy-amd tvy-amd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love the output table and the shortness of this PR.
Looks good overall. I just had a couple of suggestions

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@SamuelReeder SamuelReeder marked this pull request as ready for review June 1, 2026 18:41
@SamuelReeder SamuelReeder requested a review from a team as a code owner June 1, 2026 18:41

@tvy-amd tvy-amd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@SamuelReeder SamuelReeder merged commit 742965e into develop Jun 1, 2026
13 of 14 checks passed
@SamuelReeder SamuelReeder deleted the users/sareeder/simplify-benchmark-engine-comparison branch June 1, 2026 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants